/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ads.graph;

import ads.graph.Graph.Node;
import java.util.Comparator;

/**
 *
 * @author framet-lap
 */
public class NodeComperator implements Comparator<Node> {

    @Override
    public int compare(Node o1, Node o2) {
        if (o1.costToStartNode < o2.costToStartNode) {
            return -1;
        } else if (o1.costToStartNode > o2.costToStartNode) {
            return 1;
        } else {
            return 0;
        }
    }
}
